<ion-view hide-nav-bar="true" id="checkTableRecord">
	<ion-header-bar>
		<div class="buttons buttons-left"> <i class="button button-clear button-light icon ion-ios-arrow-left" 
		 ng-click="goBack('checkTableRecord')"></i>
		</div>
		<div class="title">{{checkTableRecordCtrl.title}}</div>
	</ion-header-bar>
	<ion-content overflow-scroll="false">
		<div class="row">
			<div class="col">
				<span style="padding:0 5px;">检查日期</span>
				<input type="date" style="border:1px solid lightgray;display: inline;min-height:40px;" 
				ng-model="checkTableRecordCtrl.queryData.startTimeDate"></div>
			<div class="col" ng-show="checkTableRecordCtrl.queryData.tableType">
				<div class="list list-inset" style="margin:0">
					<label class="item item-input" style="padding: 3px 16px 3px 10px;">
						<input type="text" placeholder="请输入关键字搜索"
						 ng-model="checkTableRecordCtrl.queryData.title"> 
						 <i class="icon ion-search placeholder-icon" ng-click="checkTableRecordCtrl.queryTableList()"></i>
					</label>
				</div>
			</div>

			<div class="col" ng-show="checkTableRecordCtrl.queryData.tableType">
				<button class="button button-clear-color" ng-click="checkTableRecordCtrl.queryTableList()">搜索</button>
			</div>
			
			<div class="col" style="text-align:right" 
			ng-show="checkTableRecordCtrl.queryData.tableType">
				<button class="button button-full-color" ng-click="checkTableRecordCtrl.modifyTable()">新增表格</button>
			</div>
		</div>

		<ion-list class="list-content">
			<ion-item class="row item-header">
				<div class="col col-30">
					<span>标题</span>
				</div>
				<div class="col col-20">
					<span>开始登记时间</span>
				</div>
				<div class="col col-20">
					<span>更新时间</span>
				</div>
				<div class="col col-30">
					<span>操作</span>
				</div>
			</ion-item>
			<ion-item class = "row" ng-repeat = "value in checkTableRecordCtrl.checkTableList">
				<div class="col col-30 overflowText">
					<div class="overflowText">{{value.title}}</div>
				</div>
				<div class="col col-20">
					<span>{{value.registerTime}}</span>
				</div>
				<div class="col col-20">
					<span>{{value.updateTime}}</span>
				</div>
				<div class="col col-30" ng-show="(checkTableRecordCtrl.operateStatus == 0)">
					<button class="button button-clear-color" style="padding:0 24px"
					 ng-click="checkTableRecordCtrl.checkTable(value.tableType,value.recordId)">查看</button>
				</div>
				<div class="col col-30" ng-show="(checkTableRecordCtrl.operateStatus == 1)">
					<button class="button button-clear-color" style="padding:0 24px"
					 ng-click="checkTableRecordCtrl.checkTable(value.tableType,value.recordId)">查看</button>
					<button class="button button-clear-color" style="padding:0 24px"
					 ng-click="checkTableRecordCtrl.modifyTable(value.tableType,value.recordId)">编辑</button>
					<button class="button button-clear-color" style="padding:0 24px"
					 ng-click="checkTableRecordCtrl.deleteTable(value.tableType,value.recordId)">删除</button>
				</div>
				<div class="col col-30" ng-show="(checkTableRecordCtrl.operateStatus == 2)">
					<button class="button button-clear-color" style="padding:0 24px"
					 ng-click="checkTableRecordCtrl.checkTable(value.tableType,value.recordId)">查看</button>
					<button class="button button-clear-color" style="padding:0 24px"
					ng-click="checkTableRecordCtrl.approve(value.tableType,value.recordId)">验收</button>
				</div>
			</ion-item>
			<ion-item class="border0" 
			ng-hide="(checkTableRecordCtrl.checkTableList &&checkTableRecordCtrl.checkTableList.length > 0)">
				<center>暂无表格数据</center>
			</ion-item>
		</ion-list>
	</ion-content>
</ion-view>

<style type="text/css">
	#checkTableRecord .col {
		align-self: center;
	}
	#checkTableRecord .list .item-header {
		color:#17a47d;
	}
	#checkTableRecord .list-content .item {
		padding: 8px 16px;
	}
</style>